package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WmsMaterialDataMapper;
import com.ruoyi.system.domain.WmsMaterialData;
import com.ruoyi.system.service.IWmsMaterialDataService;

/**
 * 物料数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-08
 */
@Service
public class WmsMaterialDataServiceImpl implements IWmsMaterialDataService 
{
    @Autowired
    private WmsMaterialDataMapper wmsMaterialDataMapper;

    /**
     * 查询物料数据
     * 
     * @param materialId 物料数据主键
     * @return 物料数据
     */
    @Override
    public WmsMaterialData selectWmsMaterialDataByMaterialId(Long materialId)
    {
        return wmsMaterialDataMapper.selectWmsMaterialDataByMaterialId(materialId);
    }

    /**
     * 查询物料数据列表
     * 
     * @param wmsMaterialData 物料数据
     * @return 物料数据
     */
    @Override
    public List<WmsMaterialData> selectWmsMaterialDataList(WmsMaterialData wmsMaterialData)
    {
        return wmsMaterialDataMapper.selectWmsMaterialDataList(wmsMaterialData);
    }

    /**
     * 新增物料数据
     * 
     * @param wmsMaterialData 物料数据
     * @return 结果
     */
    @Override
    public int insertWmsMaterialData(WmsMaterialData wmsMaterialData)
    {
        return wmsMaterialDataMapper.insertWmsMaterialData(wmsMaterialData);
    }

    /**
     * 修改物料数据
     * 
     * @param wmsMaterialData 物料数据
     * @return 结果
     */
    @Override
    public int updateWmsMaterialData(WmsMaterialData wmsMaterialData)
    {
        return wmsMaterialDataMapper.updateWmsMaterialData(wmsMaterialData);
    }

    /**
     * 批量删除物料数据
     * 
     * @param materialIds 需要删除的物料数据主键
     * @return 结果
     */
    @Override
    public int deleteWmsMaterialDataByMaterialIds(Long[] materialIds)
    {
        return wmsMaterialDataMapper.deleteWmsMaterialDataByMaterialIds(materialIds);
    }

    /**
     * 删除物料数据信息
     * 
     * @param materialId 物料数据主键
     * @return 结果
     */
    @Override
    public int deleteWmsMaterialDataByMaterialId(Long materialId)
    {
        return wmsMaterialDataMapper.deleteWmsMaterialDataByMaterialId(materialId);
    }
}
